package com.trafficsys.modules.owner.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.trafficsys.modules.entity.Driver;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface EditMessageDao extends BaseMapper<Driver> {
    //修改密码
    @Update("Update driver set password=#{password} where card_id=#{cardId} ")
    int updatePasswordByCardId(@Param("cardId") String cardId, @Param("password") String password);

    //更改绑定的手机号
    @Update("Update driver set phone=#{phone} where card_id=#{cardId}")
    int updateTelByCardId(@Param("cardId") String cardId, @Param("phone") String phone);
}
